import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from './store'
// _swiper @5.4.5@swiper
//全局组件
import TypeNav from "@/components/TypeNav"
import Carousel from "@/components/Carousel";
import Pagination from '@/components/pagination';
import './mock/mockServe'
import { MessageBox } from 'element-ui';

import "swiper/dist/css/swiper.css"
import * as API from '@/api'
import VueLazyLoad from 'vue-lazyload'
import lazyload from '@/assets/images/lazyload.gif'
import '@/plugins/validate'

//全局注册
Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.component(Pagination.name, Pagination)
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;


Vue.config.productionTip = false

Vue.use(VueLazyLoad, {
  loading: lazyload
})
new Vue({
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store
}).$mount('#app')
